//**************************************************************************************************************
// CLASS: Args
//
// DESCRIPTION
// Handles command line options and arguments.
//
// AUTHOR INFORMATION
// Kevin R. Burger
//   
// Mailing Address:
// Computer Science & Engineering
// School of Computing, Informatics, and Decision Systems Engineering
// Arizona State University
// Tempe, AZ 85287-8809
//
// Email: burgerk@asu
// Web:   http://kevin.floorsoup.com
//**************************************************************************************************************
#ifndef ARGS_HPP
#define ARGS_HPP

#include <string>
#include "Types.hpp"

//==============================================================================================================
// CLASS: Args
//==============================================================================================================
class Args {

public:
    //==========================================================================================================
    // PUBLIC CONSTANT MEMBERS
    //==========================================================================================================
    static int const EXCEPT_ARGS = -1;

    //==========================================================================================================
    // PUBLIC FUNCTION MEMBERS
    //==========================================================================================================

    //----------------------------------------------------------------------------------------------------------
    // Default ctor.
    //----------------------------------------------------------------------------------------------------------
    Args
        (
        uint const   pArgc = 0, 
        char const **pArgv = 0
        );

    //----------------------------------------------------------------------------------------------------------
    // Copy ctor.
    //----------------------------------------------------------------------------------------------------------
    Args
        (
        Args const& pArgs
        );

    //----------------------------------------------------------------------------------------------------------
    // Dtor.
    //----------------------------------------------------------------------------------------------------------
    ~Args
        (
        );

    //----------------------------------------------------------------------------------------------------------
    // GetBinFilename()
    //----------------------------------------------------------------------------------------------------------
    std::string GetBinFilename
        (
        )
        const;

    //----------------------------------------------------------------------------------------------------------
    // GetSrcFilename()
    //----------------------------------------------------------------------------------------------------------
    std::string GetSrcFilename
        (
        )
        const;

    //----------------------------------------------------------------------------------------------------------
    // operator=()
    //----------------------------------------------------------------------------------------------------------
    Args& operator=
        (
        Args const& pArgs
        );

protected:
    //==========================================================================================================
    // PROTECTED FUNCTION MEMBERS
    //==========================================================================================================

    //----------------------------------------------------------------------------------------------------------
    // Copy()
    //----------------------------------------------------------------------------------------------------------
    void Copy
        (
        Args const& pArgs
        );

    //----------------------------------------------------------------------------------------------------------
    // Init()
    //----------------------------------------------------------------------------------------------------------
    void Init
        (
        uint const   pArgc, 
        char const **pArgv
        );

    //----------------------------------------------------------------------------------------------------------
    // SetBinFilename()
    //----------------------------------------------------------------------------------------------------------
    void SetBinFilename
        (
        std::string pSrcFilename
        );

    //----------------------------------------------------------------------------------------------------------
    // SetSrcFilename()
    //----------------------------------------------------------------------------------------------------------
    void SetSrcFilename
        (
        std::string pSrcFilename
        );

private:
    //==========================================================================================================
    // PRIVATE DATA MEMBERS
    //==========================================================================================================

    // The two arguments expected on the command line are the name of the binary file and the source file.
    std::string mBinFilename;
    std::string mSrcFilename;
};

#endif
